You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Data source adapter, virtual data loader, TreeList data controller and data source adapter - type grid_core data source adapter and utils - #35490
Added strict types to the grid_core data source adapter and its helper utilities, so m_data_source_adapter.ts and m_data_source_adapter_utils.ts pass the strict lint rules while keeping the m_ prefix
How
Annotated fields, parameters and return types and replaced loose any with real types, keeping the widely used public getters unchanged
This cast makes the getter claim that pageIndex and pageSize always exist, but before the first load _lastLoadOptions is undefined and this branch returns {}. That leaves callers with an unsound numeric contract. Return a partial shape here, matching data_source_controller.ts:182, instead of asserting required fields.
The callback can return undefined when store.keyOf(data) is absent from _dataIndexByKey, but the new annotation promises a number. This hides a real result that sort consumers can receive. Please type _dataIndexGetter, this callback, and getDataIndexGetter() as returning number | undefined.
The getter can return undefined: when _cachedStoreData is unset or does not contain the requested key, the record lookup in getDataIndexGetter has no value. Declaring this callback as always returning number hides that valid outcome from callers. Please use number | undefined consistently in this field, getDataIndexGetter, and the delegating controller signature.
Narrow extension-point return type to key-info shape
This extension-point contract is broader than the object it actually guarantees. The TreeList override returns only key and keyOf (and currently has to cast that object to Store), while this method is consumed solely as applyBatch key information. Typing it as a full Store can let future callers invoke methods that are absent at runtime; narrow the return type to the key-info shape.
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Added strict types to the grid_core data source adapter and its helper utilities, so m_data_source_adapter.ts and m_data_source_adapter_utils.ts pass the strict lint rules while keeping the
m_prefixHow
Annotated fields, parameters and return types and replaced loose
anywith real types, keeping the widely used public getters unchanged